Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sourcebundle): Add callback to handle skipped files #864

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

szokeasaurusrex
Copy link
Member

Add a callback to SourceBundleWriter that is called every time we skip adding a file to the bundle due to a ReadFailed error.

Also, #861 missed another spot where the ReadFailed error can cause the write function to fail; this PR fixes that.

Closes #863
Fixes #860

Add a callback to SourceBundleWriter that is called every time we skip adding a file to the bundle due to a ReadFailed error.

Closes #863
#861 missed another spot where the ReadFailed error can cause the write function to fail; this commit fixes that.

Fixes #860
Copy link

github-actions bot commented Aug 30, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 6fb5a49

Copy link
Contributor

@loewenheim loewenheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an elegant way of doing it!

@szokeasaurusrex
Copy link
Member Author

This is an elegant way of doing it!

Yeah, many thanks to @jan-auer for helping me to come up with this idea! We are fully backwards compatible in this way

@szokeasaurusrex
Copy link
Member Author

@loewenheim I also had the idea that we could similarly add a with_filter function to add a filter callback on the SourceBundleWriter to be used with write_object, which would allow us to deprecate and eventually remove write_object_with_filter.

@loewenheim
Copy link
Contributor

@loewenheim I also had the idea that we could similarly add a with_filter function to add a filter callback on the SourceBundleWriter to be used with write_object, which would allow us to deprecate and eventually remove write_object_with_filter.

It's something to think about.

CHANGELOG.md Outdated Show resolved Hide resolved
symbolic-debuginfo/src/sourcebundle.rs Outdated Show resolved Hide resolved
Co-authored-by: Jan Michael Auer <jan.auer@sentry.io>
@szokeasaurusrex szokeasaurusrex merged commit a66bcd1 into master Sep 4, 2024
13 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/skipping-sources branch September 4, 2024 11:51
@p0358
Copy link

p0358 commented Sep 4, 2024

Since #860 was closed, does that mean that sentry-cli also handles this now in some way already? What would be the behavior now when a file is to be skipped? Bail out, warning, or silent debug log? (assuming either option would now log the file name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indicate invalid files that SourceBundleWriter skips Uploading debug information files fails in v2.33.1
4 participants